package com.ntd.study.database.study.datasource;

import cn.hutool.core.lang.Console;

import java.sql.SQLException;

/**
 * 数据库执行记录管理
 *
 */
public class StudyDataSource {

    public static void main(String[] args) throws SQLException {
        final HandleDataSource handleDataSource = new HandleDataSource("jdbc:mysql://rm-bp1k6dy03e1nj07q8o.mysql.rds.aliyuncs.com:3306?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC",
                "com.mysql.cj.jdbc.Driver",
                "bootdo",
                "Hntl@2020");
        Console.log(handleDataSource.getDatabases());
        Console.log(handleDataSource.getTablesByDatabaseName("bootdo"));
        Console.log(handleDataSource.getColsByTableNameAndDatabaseName("bootdo", "act_evt_log"));
        Console.log(handleDataSource.getTableSize("bootdo", "act_evt_log"));
    }

}
